package a.j;

import a.c.v;
import a.e.c;

import java.awt.*;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class yb
  extends tb
{
  private static final double H = 0.5D;
  private final GeneralPath I = new GeneralPath();
  private double J;
  public static int K;
  
  public yb()
  {
    this.J = 0.1D;
  }
  
  public yb(tb paramtb)
  {
    super(paramtb);
    if (!ld.E)
    {
      this.J = 0.1D;
      if (!(paramtb instanceof yb)) {}
    }
    else
    {
      a(((yb)paramtb).Z());
    }
  }
  
  public tb b(tb paramtb)
  {
    return new yb(paramtb);
  }
  
  public eb a(double paramDouble1, double paramDouble2, eb parameb, int paramInt)
  {
    eb localeb = new eb(this, paramDouble1, paramDouble2);
    a(localeb, parameb, paramInt);
    return localeb;
  }
  
  public void a(eb parameb1, eb parameb2, int paramInt)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramInt == 0)
      {
        this.D.b(parameb1, this.D.d(parameb2));
        if (bool) {
          return;
        }
      }
    }
    else {
      if (!ld.D) {
        break label59;
      }
    }
    this.D.a(parameb1, this.D.d(parameb2));
    label59:
    Q();
  }
  
  public eb b(double paramDouble1, double paramDouble2)
  {
    int i = f(paramDouble1, paramDouble2);
    if (i >= 0) {
      return a(paramDouble1, paramDouble2, (eb)this.D.a(i), 1);
    }
    return null;
  }
  
  public boolean d(double paramDouble1, double paramDouble2)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (!P()) {
        return super.d(paramDouble1, paramDouble2);
      }
    }
    if (!bool) {}
    return f(paramDouble1, paramDouble2) >= 0;
  }
  
  public eb a(eb parameb)
  {
    this.D.remove(parameb);
    Q();
    return parameb;
  }
  
  private int f(double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    double d1 = k().a(h());
    double d2 = k().b(h());
    int i = 0;
    fb localfb = o();
    do
    {
      if (!localfb.e()) {
        break;
      }
      eb localeb = localfb.a();
      d3 = localeb.b();
      d4 = localeb.c();
      if (bool1) {
        break label177;
      }
      if (Line2D.ptSegDist(d1, d2, d3, d4, paramDouble1, paramDouble2) < 5.0D) {
        return i;
      }
      d1 = d3;
      d2 = d4;
      localfb.f();
      i++;
    } while (!bool1);
    double d3 = l().a(g());
    double d4 = l().b(g());
    if ((!bool2) && (Line2D.ptSegDist(d1, d2, d3, d4, paramDouble1, paramDouble2) < 5.0D)) {
      label177:
      return i;
    }
    return -1;
  }
  
  protected byte a(Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (n() != 0)
      {
        if (bool2) {
          break label51;
        }
        if (this.J < 1.0D) {
          break label47;
        }
      }
    }
    return ye.a(this, this.E, paramPoint2D1, paramPoint2D2);
    label47:
    label51:
    int i = n();
    if (!bool2) {}
    float f1 = this.J == 0.0D ? 0.0F : (float)(1.0D - this.J) * 0.5F;
    float f2 = 1.0F - f1;
    this.E.reset();
    this.I.reset();
    ld localld = h();
    zd localzd = k();
    this.I.moveTo(f3 = (float)localzd.a(localld), f4 = (float)localzd.b(localld));
    int j = 0;
    float f5 = f3;
    float f6 = f4;
    fb localfb = o();
    eb localeb = localfb.a();
    float f3 = (float)localeb.b();
    float f4 = (float)localeb.c();
    localfb.f();
    j++;
    if (j < i) {
      localeb = localfb.a();
    }
    float f9;
    float f10;
    label394:
    do
    {
      f8 = (float)localeb.b();
      f9 = (float)localeb.c();
      if (bool1) {
        break label422;
      }
      if ((bool2) || (f1 > 0.0F))
      {
        f10 = f2 * f3 + f5 * f1;
        float f11 = f2 * f4 + f6 * f1;
        this.I.lineTo(f10, f11);
        f10 = f1 * f8 + f3 * f2;
        f11 = f1 * f9 + f4 * f2;
        this.I.quadTo(f3, f4, f10, f11);
        f5 = f3;
        f6 = f4;
        f3 = f8;
        f4 = f9;
        if (bool2) {
          break label394;
        }
        if (!bool1) {}
      }
      else
      {
        this.I.quadTo(f3, f4, (f3 + f8) * 0.5F, (f4 + f9) * 0.5F);
        f3 = f8;
        f4 = f9;
      }
      localfb.f();
      j++;
      if (!bool1) {
        break;
      }
      localld = g();
      localzd = l();
    } while (bool2);
    label422:
    float f7 = (float)localzd.a(localld);
    float f8 = (float)localzd.b(localld);
    if ((bool2) || (f1 > 0.0F))
    {
      f9 = f2 * f3 + f5 * f1;
      f10 = f2 * f4 + f6 * f1;
      this.I.lineTo(f9, f10);
      f9 = f1 * f7 + f3 * f2;
      f10 = f1 * f8 + f4 * f2;
      this.I.quadTo(f3, f4, f9, f10);
      this.I.lineTo(f7, f8);
      if (bool2) {
        break label608;
      }
      if (!bool1) {}
    }
    else
    {
      this.I.quadTo(f3, f4, f7, f8);
    }
    this.E.append(this.I.getPathIterator(null, 0.5D), false);
    label608:
    return ye.a(this, this.E, this.E = new GeneralPath(1, n() + 4), paramPoint2D1, paramPoint2D2);
  }
  
  public boolean b(Rectangle2D paramRectangle2D)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    boolean bool1 = super.b(paramRectangle2D);
    if (!bool3) {
      if (!bool1)
      {
        Object localObject2;
        if (!bool3) {
          if (P())
          {
            localObject1 = this.D.f();
            do
            {
              if (localObject1 == null) {
                break;
              }
              localObject2 = (eb)((v)localObject1).c();
              if (bool2) {
                break label240;
              }
              if (paramRectangle2D.contains(((eb)localObject2).b(), ((eb)localObject2).c())) {
                return true;
              }
              localObject1 = ((v)localObject1).a();
            } while (!bool2);
            localObject1 = h();
            localObject2 = k();
            if (bool3) {
              break label240;
            }
            if (!bool3)
            {
              if (paramRectangle2D.contains(((zd)localObject2).a((ld)localObject1), ((zd)localObject2).b((ld)localObject1))) {
                return true;
              }
              localObject1 = g();
              localObject2 = l();
            }
            if ((!bool3) && (!paramRectangle2D.contains(((zd)localObject2).a((ld)localObject1), ((zd)localObject2).b((ld)localObject1)))) {
              break label239;
            }
            return true;
          }
        }
        Object localObject1 = this.D.f();
        do
        {
          if (localObject1 == null) {
            break;
          }
          localObject2 = (eb)((v)localObject1).c();
          if (bool2) {
            break label240;
          }
          if (((eb)localObject2).d())
          {
            if (bool3) {
              continue;
            }
            if (paramRectangle2D.contains(((eb)localObject2).b(), ((eb)localObject2).c())) {
              return true;
            }
          }
          localObject1 = ((v)localObject1).a();
        } while (!bool2);
        label239:
        label240:
        return false;
      }
    }
    return true;
  }
  
  public void a(Rectangle2D paramRectangle2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    super.a(paramRectangle2D);
    Object localObject2;
    if (!bool2) {
      if (P())
      {
        localObject1 = this.D.f();
        do
        {
          if (localObject1 == null) {
            break;
          }
          localObject2 = (eb)((v)localObject1).c();
          paramRectangle2D.add(((eb)localObject2).b(), ((eb)localObject2).c());
          localObject1 = ((v)localObject1).a();
          if ((!bool2) && (bool1)) {
            return;
          }
        } while (!bool1);
        localObject1 = h();
        localObject2 = k();
        paramRectangle2D.add(((zd)localObject2).a((ld)localObject1), ((zd)localObject2).b((ld)localObject1));
        localObject1 = g();
        if (bool2) {
          break label143;
        }
        localObject2 = l();
        paramRectangle2D.add(((zd)localObject2).a((ld)localObject1), ((zd)localObject2).b((ld)localObject1));
        if ((bool2) || (!bool1)) {
          return;
        }
      }
    }
    label143:
    Object localObject1 = this.D.f();
    do
    {
      if (localObject1 == null) {
        break;
      }
      localObject2 = (eb)((v)localObject1).c();
      if (!bool2)
      {
        if (((eb)localObject2).d()) {
          paramRectangle2D.add(((eb)localObject2).b(), ((eb)localObject2).c());
        }
        localObject1 = ((v)localObject1).a();
      }
    } while (!bool1);
  }
  
  protected void d(Graphics2D paramGraphics2D)
  {
    super.b(paramGraphics2D);
    super.d(paramGraphics2D);
  }
  
  public void a(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.writeByte(0);
    super.a(paramObjectOutputStream);
    paramObjectOutputStream.writeDouble(Z());
  }
  
  public void a(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    if (!ld.E) {}
    switch (paramObjectInputStream.readByte())
    {
    case 0: 
      super.a(paramObjectInputStream);
      a(paramObjectInputStream.readDouble());
      if (!ld.D) {
        break;
      }
    default: 
      throw new c();
    }
  }
  
  public double Z()
  {
    return this.J;
  }
  
  public void a(double paramDouble)
  {
    boolean bool = ld.E;
    if ((bool) || (paramDouble >= 0.0D))
    {
      if (bool) {
        break label42;
      }
      if (paramDouble <= 1.0D) {}
    }
    else
    {
      throw new IllegalArgumentException();
    }
    if (!bool)
    {
      if (this.J != paramDouble) {
        label42:
        this.J = paramDouble;
      }
    }
    else {
      Q();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.yb

 * JD-Core Version:    0.7.0.1

 */